package ext.acae2.document.bean;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

import org.apache.commons.lang.StringUtils;

/**
 * @desription programPack
 * @author cnie
 * @date 2013-8-7 下午6:38:03
 */
public class ProgramPackBean implements java.io.Serializable{
	
	public String getFileNumber() {
		return fileNumber;
	}
	public void setFileNumber(String fileNumber) {
		this.fileNumber = fileNumber;
	}
	public String getProgramPackName() {
		return programPackName;
	}
	public void setProgramPackName(String programPackName) {
		this.programPackName = programPackName;
	}
	public String getVersion() {
		return version;
	}
	public void setVersion(String version) {
		this.version = version;
	}
	public String getSecretLevel() {
		if(StringUtils.isBlank(secretLevel))
			secretLevel="普通商密";
		return secretLevel;
	}
	public ProgramPackBean(String fileNumber, String programPackName,
			String version, String secretLevel, Timestamp sendDate,
			String filePackName, String sendDept, String editDept) {
		super();
		this.fileNumber = fileNumber;
		this.programPackName = programPackName;
		this.version = version;
		this.secretLevel = secretLevel;
		this.sendDate = sendDate;
		this.filePackName = filePackName;
		this.sendDept = sendDept;
		this.editDept = editDept;
	}
	public void setSecretLevel(String secretLevel) {
		this.secretLevel = secretLevel;
	}
	public Timestamp getSendDate() {
		if(sendDate==null){
//			SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
//			sdf.setLenient(false);
			Calendar calendar = Calendar.getInstance();
			Date date = calendar.getTime();
			Timestamp ts = new Timestamp(date.getTime());
			sendDate = ts;
		}
		return sendDate;
	}
	public void setSendDate(Timestamp sendDate) {
		this.sendDate = sendDate;
	}
	public String getFilePackName() {
		return filePackName;
	}
	public void setFilePackName(String filePackName) {
		this.filePackName = filePackName;
	}
	public String getSendDept() {
		return sendDept;
	}
	public void setSendDept(String sendDept) {
		this.sendDept = sendDept;
	}
	public String getEditDept() {
		if(StringUtils.isBlank(editDept))
			editDept ="中航工业商发";
		return editDept;
	}
	public void setEditDept(String editDept) {
		this.editDept = editDept;
	}
	public int getRowNum() {
		return rowNum;
	}
	public void setRowNum(int rowNum) {
		this.rowNum = rowNum;
	}
	/**
	 * @description:TODO
	 */
	private static final long serialVersionUID = -1266997418817125271L;
	private String fileNumber;
	private String programPackName;
	private String version;
	private String secretLevel;
	private Timestamp sendDate;
	private String filePackName;
	private String sendDept;
	private String editDept;
	private int rowNum;
	

}
